package com.nuoniu.sibanyun.mapper.erp;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nuoniu.sibanyun.entity.dto.DynamicReportDto;
import com.nuoniu.sibanyun.entity.erp.ErpReportDesign;
import com.nuoniu.sibanyun.mapper.provider.ReportDesignDynamicProvider;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.HashMap;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author baiqiang
 * @since 2021-01-19
 */
public interface ErpReportDesignMapper extends BaseMapper<ErpReportDesign> {

    /**
     * 报表动态分页查询
     * @param
     * @param paramMap
     * @param page
     * @return
     */
    @SelectProvider(type = ReportDesignDynamicProvider.class, method = "detailReportDynamicSql")
    Page<HashMap<String,Object>> reportDetailDynamicPage(Integer companyId, Integer accountId, DynamicReportDto dynamicReportDto, HashMap<String, Object> paramMap, Page page);


    @SelectProvider(type = ReportDesignDynamicProvider.class, method = "statisticReportDynamicSql")
    Page<HashMap<String,Object>> reportStatisticDynamicPage(Integer companyId, Integer accountId, DynamicReportDto dynamicReportDto, HashMap<String, Object> paramMap, Page page);

    @SelectProvider(type = ReportDesignDynamicProvider.class, method = "sumStatisticReportDynamicSql")
    HashMap<String,Object> sumDynamic(Integer companyId, Integer accountId, DynamicReportDto dynamicReportDto, HashMap<String, Object> paramMap);

}
